var low_IE=false;
if(low_IE){
	$(".bbs_newsearch_kuang").prepend('<img src="/img/new_zhulong/top_search_left.png" style="float: left;">');
	$(".bbs_newsearch_kuang").append('<img src="/img/new_zhulong/top_search_right.png" style="float: left;">');
}
else{
	$(".bbs_newsearch_kuang").addClass("newsearch_kuang2");
}
// low verison ie broswer
$("#sou").click(function() {
	var word = $("input[name=q]").val();
	if(word == '请输入关键词' || word == ''){
		alert("请输入关键词");return ;
	}
	$('#search form').submit();
	$("#kuang").animate({
		width:'210px',
		paddingLeft:'10px'
	});
	$(this).hide();
	$("#sousuo").show();
	$("#kuang").val("");
	$("#kuang").attr('placeholder',"请输入关键词");
});

$("#sou1").click(function() {
	var word = $("input[name=q]").val();
	if(word == '请输入关键词' || word == ''){
		alert("请输入关键词");return ;
	}
	$('#search1 form').submit();
	$("#kuang1").animate({
		width:'210px',
		paddingLeft:'10px'
	});
	$(this).hide();
	$("#sousuo1").show();
	$("#kuang1").val("");
	$("#kuang1").attr('placeholder',"请输入关键词");
});
$("#kuang1").focus(function(){
	$(this).animate({
		width:'210px'
	});
	$("#sousuo1").show();
	$("#kuang1").val("");
	$("#kuang1").attr('placeholder',"请输入关键词");
})

$("#kuang").focus(function(){
	$(this).animate({
		width:'210px'
	});
	$("#sousuo").show();
	$("#kuang").val("");
	$("#kuang").attr('placeholder',"请输入关键词");
})
$(document).mouseup(function(e){
var _con = $(".bbs_newsearch_kuang"); 
if(!_con.is(e.target) && _con.has(e.target).length === 0){
	$("#kuang").animate({
		width:'100px'
	});
	//$("#kuang").val("BIM证书");
	$("#sousuo").hide();
	$("#sou").show();
	$("#kuang").val($("#searchKeywords").val());
}
});

$(document).mouseup(function(e){
var _con = $(".bbs_newsearch_kuang"); 
if(!_con.is(e.target) && _con.has(e.target).length === 0){
	$("#kuang1").animate({
		width:'100px'
	});
	//$("#kuang").val("BIM证书");
	$("#sousuo1").hide();
	$("#sou1").show();
	$("#kuang1").val($("#searchKeywords").val());
}
});
// search check 
$("#sousuo").click(function(event) {
	var value = $("input[name=q]").val();
	if (value == "" || value == "请输入关键词") {
		// alert("请输入关键词");return ;
		//$("#kuang").val("BIM证书");
		//$('#search form').submit();
		//event.preventDefault();
	} else {
		$('#search form').submit();
	}
});

$("#sousuo1").click(function(event) {
	var value = $("input[name=q]").val();
	if (value == "" || value == "请输入关键词") {
		// alert("请输入关键词");return ;
		//$("#kuang").val("BIM证书");
		//$('#search form').submit();
		//event.preventDefault();
	} else {
		$('#search1 form').submit();
	}
});

$("#clicksou").click(function(event) {
	var value = $("input[name=q]").val();
	if (value == "") {
		alert("请输入关键词");
		event.preventDefault();
	} else {
	}
});

$("#clicksou1").click(function(event) {
	var value = $("input[name=q]").val();
	if (value == "") {
		alert("请输入关键词");
		event.preventDefault();
	} else {
	}
});

function formsub() {
	var value = $("input[name=q]").val();
	if (value == "") {
		alert("请输入关键词");
		return false;
	} else {
		return true;
	}
}
/*
 * function moreshowHandle()
 */
function moreshowHandle() {
	var show = 0;
	$("#more").mousemove(function() {
		show = 1;
		$("#detail").css("display", "block");
	});
	$("#more").mouseout(function(obj) {
		show = 0;
		setTimeout(function() {
			if (show == 0) {
				$("#detail").css("display", "none");
			}
		}, 500);
	});
	$("#detail").mousemove(function() {
		show = 1;
		$("#detail").css("display", "block");
	});
	$("#detail").mouseout(function(obj) {
		show = 0;
		setTimeout(function() {
			if (show == 0) {
				$("#detail").css("display", "none");
			}
		}, 500);
	});

	$("#more1").mousemove(function() {
		show = 1;
		$("#detail1").css("display", "block");
	});
	$("#more1").mouseout(function(obj) {
		show = 0;
		setTimeout(function() {
			if (show == 0) {
				$("#detail1").css("display", "none");
			}
		}, 500);
	});
	$("#detail1").mousemove(function() {
		show = 1;
		$("#detail1").css("display", "block");
	});
	$("#detail1").mouseout(function(obj) {
		show = 0;
		setTimeout(function() {
			if (show == 0) {
				$("#detail1").css("display", "none");
			}
		}, 500);
	});
}
moreshowHandle();